package com.sc.nft.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sc.nft.entity.MallDeliveryAddress;
import com.sc.nft.entity.vo.MallDeliveryAddressVO;
import org.apache.ibatis.annotations.Param;

/**
 * 收货地址表(MallDeliveryAddress)表数据库访问层
 *
 * @author wwc
 * @since 2023-05-11 16:35:36
 */
public interface MallDeliveryAddressMapper extends BaseMapper<MallDeliveryAddress> {

    /**
     * 分页查询地址列表
     *
     * @param toMp
     * @return
     */
    Page<MallDeliveryAddressVO> getPageData(Page toMp, @Param("userId") Long userId);

    /**
     * 获取默认地址
     *
     * @param userId
     * @return
     */
    MallDeliveryAddressVO getDefaultAddress(@Param("userId") Long userId);

}
